<?php

/**
 * Class model Product image 
 *
 * @author NguyenVanTien
 */
class Application_Model_ProductImages extends Application_Model_DbTable_ProductImages {

    /**
     * Reference mapping with table parent
     * Reference Application_Model_Product with product_id
     * @var type 
     */
    protected $_referenceMap = array(
        'Application_Model_Products' => array(
            'columns' => 'product_id',
            'refTableClass' => 'Application_Model_Products',
            'refColumns' => 'product_id'
        )
    );
    
    /**
     * Get list image product
     * @param int $productId
     * @return Zend_Db_Table_Rowset_Abstact
     */
    public function getListImageProduct($productId){
        return $this->fetchAll('product_id ='. $productId);
    }
}